<div ng-include="'views/appbar.html'"></div>
<div class="card ng-hide am-fade-and-slide-bottom card-height" ng-show='up'>
    <div ng-include="'views/breadcrumb-nav.html'"></div>
    <div class="container">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="standard-spacing">
                    <p class="text-info"><sup>*</sup>Auto-saves after 3 seconds.</p>
                    <table class='table table-condensed'>
                        <thead>
                            <tr>
                                <th class="text-muted width-10-perc">ID</th>
                                <th class="text-muted width-10-perc">DAEMON</th>
                                <th class="text-muted width-20-perc">STATE</th>
                                <th class="text-muted width-20-perc">RE-WEIGHT %<sup class="text-info">*</sup>

                                </th>
                                <th class="text-muted">COMMANDS</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class='am-fade' ng-repeat='osd in osds'>
                                <td ng-bind='osd.id'></td>
                                <td> <span ng-if="osd.running" class="label label-success">RUNNING</span>
 <span ng-if="!osd.running"
                                    class="label label-warning">DEAD</span>

                                </td>
                                <td> <span ng-if="osd.up" class="label label-success">UP</span>
 <span ng-if="!osd.up"
                                    class="label label-danger">DOWN</span>
 <span ng-if="osd.in" class="label label-success">IN</span>

                                    <span
                                    ng-if="!osd.in" class="label label-danger">OUT</span>
                                </td>
                                <td>
                                    <input tabindex={{$index+1}} style="width: 4em;" type='number' min="0" max="100" ng-disabled='osd.editing || osd.editDisabled'
                                    required=true name="reweight" ng-model='osd.reweight' ng-change='changedFn(osd)'
                                    />&nbsp; <i ng-show="osd.editing" class='fa fa-spinner fa-spin fa-lg fa-fw'></i>

                                    <i
                                    ng-show="osd.saved" class='text-success fa fa-check-circle fa-lg fa-fw'></i> <i ng-show="osd.hasError" class='text-danger fa fa-exclamation-triangle fa-lg fa-fw'></i>

                                </td>
                                <td>
                                    <button ng-disabled='osd.disabled' type='button' ng-click='displayFn(osd.id)'
                                    class='btn btn-md btn-info'> <i class='fa fa-info-circle fa-fw fa-lg'></i>

                                    </button>
                                    <button ng-disabled='osd.repairDisabled || osd.disabled' ng-bind-html='osd.repairText'
                                    type='button' data-html='true' class='btn btn-md btn-danger' data-template="views/dropdown.tpl.html"
                                    bs-dropdown='osd.repairDropdown'></button>
                                    <button ng-bind-html='osd.configText' ng-disabled='osd.disabled' type='button'
                                    data-html='true' class='btn btn-md btn-warning' data-template="views/dropdown.tpl.html"
                                    bs-dropdown='osd.configDropdown'></button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="footer"></div>
    </div>
</div !-- card -->
